package com.linciping.sample.nativecrash

import android.util.Log

object NativeCrashHandler : Thread.UncaughtExceptionHandler {

    const val TAG = "NativeCrashHandler"

    override fun uncaughtException(t: Thread, e: Throwable) {
        Log.e(TAG, "thread=${t.name}")
        Log.e(TAG, "message=${e.message}")
        Log.e(TAG, "stack trace:")
        for (item in e.stackTrace) {
            Log.e(TAG, item.toString())
        }
    }
}